****************
*** The Extraordinary Effect of Religious Sect Endorsements on Vote Choice: Evidence from Iglesia ni Cristo's "Vote as One" Teaching
*** Nico Ravanilla
*** November 2024
*** Latest update: November 10, 2024 by Nico
*** Version 2 (CPS Final Replication)
*** Replication code
***************

/* Data accessed in this replication file:
4_Main Dataset.dta
*/

*** Created in STATA/SE version 18.0

clear all
set more off

*** Install commands

*** Change to appropriate working directory (e.g.)

cd "/Users/nravanilla/Library/CloudStorage/Dropbox/Project INC/CPS Submission/Replication Files"

*** Create log file

capture log close
log using 7_extraordinary_inc_logfile.log, replace

************************
* Main Tables & Figure *
************************


***********************
* Preliminary Commands*
***********************

use "4_Main Dataset.dta",clear

replace inc_share =ln(1+inc_share)
replace rc_share =ln(1+rc_share) 
replace aglipay_share =ln(1+aglipay_share)
replace mormon_share =ln(1+mormon_share)
replace islam_share =ln(1+islam_share)
replace uccp_share =ln(1+uccp_share)
replace pentecostal_share =ln(1+pentecostal_share)
replace aog_share =ln(1+aog_share)
replace jehovah_share =ln(1+jehovah_share)
replace coc_share =ln(1+coc_share)
replace other_share =ln(1+other_share)

tab year, gen(year)
tab sen, gen(sen)


*Drop outlier municipality in terms of number of INC members; this drops the municipality of Sibutu in Tawi-Tawi province.
*None of the results change substantively if this municipality observaiton, although the magnitude of the main estimated elasticity
*drops from 0.97 to 0.91. This municipality is clearly an outlier, given the average share of INC voting population is 0.02
*or 2% of the municipal voting population, while that in Sibutu is 0.27. 
keep if inc_share<=0.2

***********
* Table 1 * List of top 24 vote-getting senatorial candidates in 2007.
***********

*No replication. The table presents original coding by the author, derived from secondary data sources.


***********
* Table 2 * List of top 24 vote-getting senatorial candidates in 2010.
***********

*No replication. The table presents original coding by the author, derived from secondary data sources.


***********
* Table 3 * Summary statistics.
***********

*Install required command if needed:
*ssc install estout


estpost summarize inc_share rc_share aglipay_share mormon_share islam_share uccp_share ///
    pentecostal_share aog_share jehovah_share coc_share other_share ///
    edu_none edu_elem edu_hs edu_coll edu_grad edu_unknown ///
    ms_married ms_single ms_widowed ms_div_sep ms_comlaw_livin ms_unknown ///
    a18_29 a30_59 a60_above ///
    overseas_share ///
    hh_size ///
    female ///
    ln_tot_inc, detail

cd "/Users/nravanilla/Library/CloudStorage/Dropbox/Project INC/CPS Submission/Replication Files/5_Tables"

esttab using "table3.tex", replace ///
    cells("mean(fmt(3)) sd(fmt(3)) min(fmt(3)) max(fmt(3))") ///
    fragment ///
    label ///
    title("Summary statistics") ///
    alignment(D{.}{.}{-1}) ///
    varwidth(20) ///
    booktabs	
	

***********
* Table 4 * Elasticity of INC–endorsed candidates' vote-share to INC members' share of total voting population.
***********

reg sen_vs inc_share ///
rc_share aglipay_share mormon_share islam_share uccp_share pentecostal_share aog_share jehovah_share coc_share other_share ///
if endorsed==1, vce(cl mun)
estimates store reg1

areg sen_vs inc_share ///
rc_share aglipay_share mormon_share islam_share uccp_share pentecostal_share aog_share jehovah_share coc_share other_share ///
if endorsed==1 ///
, vce(cl mun) absorb(mun)
estimates store reg2

areg sen_vs inc_share ///
rc_share aglipay_share mormon_share islam_share uccp_share pentecostal_share aog_share jehovah_share coc_share other_share ///
edu_none edu_elem edu_hs edu_coll edu_grad edu_unknown ///
ms_married ms_single ms_widowed ms_div_sep ms_comlaw_livin ms_unknown /// 
a18_29 a30_59 a60_above ///
overseas_share ///
hh_size ///
male ///
ln_tot_inc ///
if endorsed==1 ///
, vce(cl mun) absorb(mun) 
estimates store reg3

areg sen_vs inc_share /// 
rc_share aglipay_share mormon_share islam_share uccp_share pentecostal_share aog_share jehovah_share coc_share other_share ///
edu_none edu_elem edu_hs edu_coll edu_grad edu_unknown ///
ms_married ms_single ms_widowed ms_div_sep ms_comlaw_livin ms_unknown /// 
a18_29 a30_59 a60_above ///
overseas_share ///
hh_size ///
male ///
ln_tot_inc ///
year1 year2 ///
if endorsed==1 ///
, vce(cl mun) absorb(mun)
estimates store reg4

areg sen_vs inc_share ///
rc_share aglipay_share mormon_share islam_share uccp_share pentecostal_share aog_share jehovah_share coc_share other_share ///
edu_none edu_elem edu_hs edu_coll edu_grad edu_unknown ///
ms_married ms_single ms_widowed ms_div_sep ms_comlaw_livin ms_unknown ///
a18_29 a30_59 a60_above ///
overseas_share ///
hh_size ///
male ///
ln_tot_inc ///
year1 year2 ///
sen1 sen2-sen92 ///
if endorsed==1 ///
, vce(cl mun) absorb(mun)
estimates store reg5

predict yhat

cd "/Users/nravanilla/Library/CloudStorage/Dropbox/Project INC/CPS Submission/Replication Files/5_Tables"
 
outreg2 [reg1 reg2 reg3 reg4 reg5] using  "table4.xls",replace auto(2) tex


***********
* Table 5 * Elasticity of non–endorsed candidates' vote-share to INC members' share of total voting population.
***********

reg sen_vs inc_share ///
rc_share aglipay_share mormon_share islam_share uccp_share pentecostal_share aog_share jehovah_share coc_share other_share ///
if endorsed==0, vce(cl mun)
estimates store reg1

areg sen_vs inc_share ///
rc_share aglipay_share mormon_share islam_share uccp_share pentecostal_share aog_share jehovah_share coc_share other_share /// 
if endorsed==0 ///
, vce(cl mun) absorb(mun)
estimates store reg2

areg sen_vs inc_share /// 
rc_share aglipay_share mormon_share islam_share uccp_share pentecostal_share aog_share jehovah_share coc_share other_share ///
edu_none edu_elem edu_hs edu_coll edu_grad edu_unknown ///
ms_married ms_single ms_widowed ms_div_sep ms_comlaw_livin ms_unknown /// 
a18_29 a30_59 a60_above /// 
overseas_share /// 
hh_size /// 
male /// 
ln_tot_inc ///
if endorsed==0 ///
, vce(cl mun) absorb(mun)
estimates store reg3

areg sen_vs inc_share /// 
rc_share aglipay_share mormon_share islam_share uccp_share pentecostal_share aog_share jehovah_share coc_share other_share ///
edu_none edu_elem edu_hs edu_coll edu_grad edu_unknown ///
ms_married ms_single ms_widowed ms_div_sep ms_comlaw_livin ms_unknown /// 
a18_29 a30_59 a60_above /// 
overseas_share /// 
hh_size /// 
male /// 
ln_tot_inc ///
year1 year2 ///
if endorsed==0 ///
, vce(cl mun) absorb(mun)
estimates store reg4

areg sen_vs inc_share /// 
rc_share aglipay_share mormon_share islam_share uccp_share pentecostal_share aog_share jehovah_share coc_share other_share ///
edu_none edu_elem edu_hs edu_coll edu_grad edu_unknown ///
ms_married ms_single ms_widowed ms_div_sep ms_comlaw_livin ms_unknown /// 
a18_29 a30_59 a60_above /// 
overseas_share /// 
hh_size /// 
male /// 
ln_tot_inc ///
year1 year2 ///
sen1 sen2-sen92 ///
if endorsed==0 ///
, vce(cl mun) absorb(mun)
estimates store reg5

predict yhat2

cd "/Users/nravanilla/Library/CloudStorage/Dropbox/Project INC/CPS Submission/Replication Files/5_Tables"

outreg2 [reg1 reg2 reg3 reg4 reg5] using  "table5.xls",replace auto(2) tex


***********
* Table 6 * Elasticity of vote-shares of INC-endorsed, anti-RH-Bill incumbents to INC members' share of total voting population.
***********

gen anti_rh_inc_endorsed=.
replace anti_rh_inc_endorsed=1 if  ///
(sen == 75 & year == 2010) | ///
(sen == 24 & year == 2010) | ///
(sen == 27 & year == 2010) | ///
(sen == 80 & year == 2010)

reg sen_vs inc_share /// 
rc_share aglipay_share mormon_share islam_share uccp_share pentecostal_share aog_share jehovah_share coc_share other_share ///
if anti_rh_inc_endorsed==1, vce(cl mun)
estimates store reg1

areg sen_vs inc_share ///
rc_share aglipay_share mormon_share islam_share uccp_share pentecostal_share aog_share jehovah_share coc_share other_share /// 
if anti_rh_inc_endorsed==1 ///
, vce(cl mun) absorb(mun)
estimates store reg2

areg sen_vs inc_share /// 
rc_share aglipay_share mormon_share islam_share uccp_share pentecostal_share aog_share jehovah_share coc_share other_share ///
edu_none edu_elem edu_hs edu_coll edu_grad edu_unknown ///
ms_married ms_single ms_widowed ms_div_sep ms_comlaw_livin ms_unknown /// 
a18_29 a30_59 a60_above /// 
overseas_share /// 
hh_size /// 
male /// 
ln_tot_inc ///
if anti_rh_inc_endorsed==1 ///
, vce(cl mun) absorb(mun)
estimates store reg3

areg sen_vs inc_share /// 
rc_share aglipay_share mormon_share islam_share uccp_share pentecostal_share aog_share jehovah_share coc_share other_share ///
edu_none edu_elem edu_hs edu_coll edu_grad edu_unknown ///
ms_married ms_single ms_widowed ms_div_sep ms_comlaw_livin ms_unknown /// 
a18_29 a30_59 a60_above /// 
overseas_share /// 
hh_size /// 
male /// 
ln_tot_inc ///
year1 year2 ///
if anti_rh_inc_endorsed==1 ///
, vce(cl mun) absorb(mun)
estimates store reg4

areg sen_vs inc_share /// 
rc_share aglipay_share mormon_share islam_share uccp_share pentecostal_share aog_share jehovah_share coc_share other_share ///
edu_none edu_elem edu_hs edu_coll edu_grad edu_unknown ///
ms_married ms_single ms_widowed ms_div_sep ms_comlaw_livin ms_unknown /// 
a18_29 a30_59 a60_above /// 
overseas_share /// 
hh_size /// 
male /// 
ln_tot_inc ///
year1 year2 ///
sen1 sen2-sen92 ///
if anti_rh_inc_endorsed==1 ///
, vce(cl mun) absorb(mun)
estimates store reg5

cd "/Users/nravanilla/Library/CloudStorage/Dropbox/Project INC/CPS Submission/Replication Files/5_Tables"

outreg2 [reg1 reg2 reg3 reg4 reg5] using  "table6.xls",replace auto(2) tex


************
* Figure 1 * Vote-shares of endorsed and non-endorsed candidates and Iglesia ni Cristo's share of municipality-level voting population.
************

replace yhat=yhat2 if endorsed==0

graph twoway ///
    (lfit yhat inc_share if endorsed==1, lcolor(navy) lpattern(solid) ///
    legend(order(1 "Endorsed candidates" 2 "Non-endorsed candidates" 3 "45-degree Line"))) ///
    (lfit yhat inc_share if endorsed==0, lcolor(navy) lpattern(dot)) ///
    (lfit inc_share inc_share, lcolor(red) lpattern(dash)), ///
    ytitle("Predicted value of vote-shares") ///
    xtitle("INC share of voting population") ///
    legend(position(10) ring(0) cols(1))

cd "/Users/nravanilla/Library/CloudStorage/Dropbox/Project INC/CPS Submission/Replication Files/6_Figures"

graph export "Figure1.png", width(1000) replace
	
	
	
************************
* Supplementary Tables *
************************


************
* Table A1 *
************

*No replication. The table presents original coding by the author, derived from secondary data sources.


************
* Table A2 *
************

*No replication. The table presents original coding by the author, derived from secondary data sources.


************
* Table A3 * Elasticity of INC–endorsed candidates' vote-share to INC members' share of total voting population in ARMM region only.
************

reg sen_vs inc_share /// 
rc_share aglipay_share mormon_share islam_share uccp_share pentecostal_share aog_share jehovah_share coc_share other_share ///
if endorsed==1 & reg=="ARMM", vce(cl mun)
estimates store reg1

areg sen_vs inc_share /// 
rc_share aglipay_share mormon_share islam_share uccp_share pentecostal_share aog_share jehovah_share coc_share other_share ///
if endorsed==1 & reg=="ARMM" ///
, vce(cl mun) absorb(mun)
estimates store reg2

areg sen_vs inc_share /// 
rc_share aglipay_share mormon_share islam_share uccp_share pentecostal_share aog_share jehovah_share coc_share other_share ///
edu_none edu_elem edu_hs edu_coll edu_grad edu_unknown ///
ms_married ms_single ms_widowed ms_div_sep ms_comlaw_livin ms_unknown /// 
a18_29 a30_59 a60_above /// 
overseas_share /// 
hh_size /// 
male /// 
ln_tot_inc ///
if endorsed==1 & reg=="ARMM" ///
, vce(cl mun) absorb(mun)
estimates store reg3

areg sen_vs inc_share /// 
rc_share aglipay_share mormon_share islam_share uccp_share pentecostal_share aog_share jehovah_share coc_share other_share ///
edu_none edu_elem edu_hs edu_coll edu_grad edu_unknown ///
ms_married ms_single ms_widowed ms_div_sep ms_comlaw_livin ms_unknown /// 
a18_29 a30_59 a60_above /// 
overseas_share /// 
hh_size /// 
male /// 
ln_tot_inc ///
year1 year2 ///
if endorsed==1 & reg=="ARMM" ///
, vce(cl mun) absorb(mun)
estimates store reg4

areg sen_vs inc_share /// 
rc_share aglipay_share mormon_share islam_share uccp_share pentecostal_share aog_share jehovah_share coc_share other_share ///
edu_none edu_elem edu_hs edu_coll edu_grad edu_unknown ///
ms_married ms_single ms_widowed ms_div_sep ms_comlaw_livin ms_unknown /// 
a18_29 a30_59 a60_above /// 
overseas_share /// 
hh_size /// 
male /// 
ln_tot_inc ///
year1 year2 ///
sen1 sen2-sen92 ///
if endorsed==1 & reg=="ARMM" ///
, vce(cl mun) absorb(mun)
estimates store reg5

predict yhat3

cd "/Users/nravanilla/Library/CloudStorage/Dropbox/Project INC/CPS Submission/Replication Files/5_Tables"
 
outreg2 [reg1 reg2 reg3 reg4 reg5] using  "tableA3.xls",replace auto(2) tex


************
* Table A4 *
************

*No replication. The table presents original coding by the author, derived from secondary data sources.


log close
